package com.bw.doctor.controller;
/**
 * @Author：尚志豪
 * @Package：com.bw.doctor.controller
 * @Project：doudi-group2-shixun-02
 * @name：RapidConsultationController
 * @Date：2025/2/27 10:07
 */
import com.bw.common.core.domain.Result;
import com.bw.common.core.web.controller.BaseController;
import com.bw.doctor.domain.Doctor;
import com.bw.doctor.domain.Patient;
import com.bw.doctor.domain.SSymptom;
import com.bw.doctor.service.RapidConsultationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: doudi-group2-shixun-02
 * @description: 快速问诊
 * @author: CuiFu Bo
 * @create: 2025-02-27 10:07
 **/
@RestController
@RequestMapping("/rapidConsultation")
public class RapidConsultationController extends BaseController
{
    @Autowired
    public RapidConsultationService rapidConsultationService;
    /**
     * 通过部位查看对应的病症
     */
    @PostMapping("/lookAtTheCorrespondingDiseaseByLocation")
    public Result lookAtTheCorrespondingDiseaseByLocation(Long id)
    {
        startPage();
        List<SSymptom> list = rapidConsultationService.lookAtTheCorrespondingDiseaseByLocation(id);
        return getDataTable(list);
    }

    /**
     * 通过病症查到对应的医生
     */
    @PostMapping("/weCanTraceTheSymptomsToTheDoctor")
    public Result weCanTraceTheSymptomsToTheDoctor(Long id)
    {
        List<Doctor> list = rapidConsultationService.weCanTraceTheSymptomsToTheDoctor(id);
        return Result.success(list);
    }
}
